import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:"/home",
    component:()=>import("../views/Home.vue"),
    children:[
      {
        path:"/home",
        redirect:"/home/homes",
      },
      {
        path:"/home/homes",
        component:()=>import("../views/Homes.vue"),
      },{
        path:"/home/fang",
        component:()=>import("../views/Fang.vue"),
      },{
        path:"/home/my",
        component:()=>import("../views/My.vue"),
      },
    ]
  },{
    path:"/login",
    component:()=>import("../views/Login.vue"),
  },{
    path:"/detail",
    component:()=>import("../views/Detail.vue"),
  },{
    path:"/zheng",
    component:()=>import("../views/Zheng.vue"),
  },
  {
    path:"/he",
    component:()=>import("../views/He.vue"),
  },
  {
    path:"/map",
    component:()=>import("../views/Map.vue"),
  },
  {
    path:"/zu",
    component:()=>import("../views/Zu.vue"),
  },
  {
    path:"/chu",
    component:()=>import("../views/Chu.vue"),
  },
  {
    path:"/look",
    component:()=>import("../views/Look.vue"),
  },
  {
    path:"/ge",
    component:()=>import("../views/Ge.vue"),
  },
  {
    path:"/lian",
    component:()=>import("../views/Lian.vue"),
  },
  {
    path:"/city",
    component:()=>import("../views/City.vue"),
  },
  {
    path:"/ditu",
    component:()=>import("../views/Ditu.vue"),
  },
  {
    path:"/index",
    component:()=>import("../views/Index.vue"),
  },
  {
    path:"/cheng",
    component:()=>import("../views/Cheng.vue"),
  },
  {
    path:"/",
    redirect:"/login",
  }
 
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
